package cn.wolfcode.luowowo.common.domain;

import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Setter
@Getter
@Document("wenda_comment")
public class WendaAnswerComment implements Serializable {

    public static final int TYPE_COMMON_COMMENT = 0;     //普通评论
    public static final int TYPE_COMMENT_COMMENT = 1;    //评论的评论
    @Id
    private String id;          //id
    private Long questionId;      //关联的答案的 id
    private Long userId;        //用户id
    private String username;    //用户名
    private String city;        //城市
    private int level;          //等级
    private String headUrl;     // 用户头像
    private Date createTime;    //创建时间
    private String content;     //评论内容
    private int type = TYPE_COMMON_COMMENT;         //评论类别,默认是普通的评论
    private WendaAnswerComment refComment;          //二级评论
    private int thumbupnum;     //点赞数
    private List<Long> thumbuplist = new ArrayList<>();  //评论点赞人的id

}